<?php

class CPSPriceHistory extends AppModel {
    var $name = 'CPSPriceHistory';

    var $useTable = 'cust_product_site_price_histories';

    var $belongsTo = array(
        'User' => array(
            'foreignKey' => 'collector_id'
        )
    );

    function save($cps_id, $price, $collector_id) {
        $data = array();
        $data['CPSPriceHistory']['id'] = null;
        $data['CPSPriceHistory']['cust_product_site_id'] = $cps_id;
        $data['CPSPriceHistory']['price'] = $price;
        $data['CPSPriceHistory']['collector_id'] = $collector_id;
        parent::save($data);
    }
}
?>
